package com.alogic.loki.handler;

import com.alogic.loki.LokiStream;
import com.anysoft.stream.AbstractHandler;
import com.anysoft.util.Properties;
import org.w3c.dom.Element;

/**
 * Debug
 *
 * @since 1.6.13.14 [20200907 duanyy] <br>
 */
public class Debug extends AbstractHandler<LokiStream> {
    @Override
    protected void onHandle(LokiStream data, long timestamp) {
        StringBuffer buffer = new StringBuffer();
        LokiStream.writeToBuffer(data,buffer);
        LOG.info(buffer.toString());
    }

    @Override
    protected void onFlush(long timestamp) {

    }

    @Override
    protected void onConfigure(Element e, Properties p) {
    }
}
